home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmProcess
- BackColor = &H00FFFFFF&
- BorderStyle = 3 'Fixed Double
- Caption = "ITGraph(tm) PROCESS FLOW DEMONSTRATION"
- ClientHeight = 5124
- ClientLeft = 3156
- ClientTop = 2964
- ClientWidth = 7644
- ControlBox = 0 'False
- Height = 5772
- Icon = PROCESS.FRX:0000
- Left = 3108
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 5124
- ScaleWidth = 7644
- Top = 2364
- Width = 7740
- Begin ITGraph itgProcess
- ArrangeMode = 0 'Hierarchical
- AutoArrange = 0 'Manual Arrange
- AutoMouseEvents = PROCESS.FRX:0302
- BackColor = &H00FFFFFF&
- DragItems = 0 'False
- DrawArrows = -1 'True
- DrawBackLinks = 2 'ITG_DashedBackLinks
- DrawColored = -1 'True
- DrawConnLabels = -1 'True
- DrawDir = 3 'Top To Bottom
- DrawHandles = -1 'True
- DrawItemLabels = -1 'True
- DrawScale = 100
- FillColor = &H00FFFFFF&
- ForeColor = &H00000000&
- Gap = 10
- GraphicAllowImport= 0 'No Import
- Graphics = PROCESS.FRX:0332
- Height = 1524
- Left = 4788
- LineWidth = 0
- PrintHeader = ""
- PrintRectHeight = 0
- PrintRectLeft = 0
- PrintRectTop = 0
- PrintRectWidth = 0
- Redraw = -1 'True
- RubberBand = 0 'No RB
- SelectedIndex = -1
- SelectRectEnabled= 0 'False
- SelectRectHeight= 0
- SelectRectLeft = 0
- SelectRectTop = 0
- SelectRectWidth = 0
- StoreGraphics = 2 'Save Referenced Graphics
- TabIndex = 0
- Top = 36
- Width = 2712
- XSpace = 20
- XSpan = 120
- YSpace = 20
- YSpan = 50
- End
- Begin ITGraph itgSubProcess
- ArrangeMode = 0 'Hierarchical
- AutoArrange = 0 'Manual Arrange
- AutoMouseEvents = PROCESS.FRX:0334
- BackColor = &H00FFFFFF&
- DragItems = 0 'False
- DrawArrows = -1 'True
- DrawBackLinks = 2 'ITG_DashedBackLinks
- DrawColored = -1 'True
- DrawConnLabels = -1 'True
- DrawDir = 3 'Top To Bottom
- DrawHandles = -1 'True
- DrawItemLabels = -1 'True
- DrawScale = 100
- FillColor = &H00FFFFFF&
- ForeColor = &H00000000&
- Gap = 10
- GraphicAllowImport= 0 'No Import
- Graphics = PROCESS.FRX:0364
- Height = 1272
- Left = 4824
- LineWidth = 0
- PrintHeader = ""
- PrintRectHeight = 0
- PrintRectLeft = 0
- PrintRectTop = 0
- PrintRectWidth = 0
- Redraw = -1 'True
- RubberBand = 0 'No RB
- SelectedIndex = -1
- SelectRectEnabled= 0 'False
- SelectRectHeight= 0
- SelectRectLeft = 0
- SelectRectTop = 0
- SelectRectWidth = 0
- StoreGraphics = 2 'Save Referenced Graphics
- TabIndex = 1
- Top = 1692
- Width = 2676
- XSpace = 20
- XSpan = 120
- YSpace = 20
- YSpan = 50
- End
- Begin Timer timTimer1
- Interval = 2000
- Left = 4356
- Top = 72
- End
- Begin Label lblMessage
- BorderStyle = 1 'Fixed Single
- Caption = "lblMessage"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 768
- Left = 0
- TabIndex = 2
- Top = 4356
- Width = 7644
- End
- Begin Menu Control
- Caption = "&Control"
- Begin Menu Interval
- Caption = "&Interval"
- Begin Menu Interval_onesec
- Caption = "1 sec"
- End
- Begin Menu Interval_twosec
- Caption = "2 sec"
- End
- Begin Menu Interval_foursec
- Caption = "4 sec"
- End
- End
- Begin Menu Run
- Caption = "&Run"
- End
- Begin Menu Pause
- Caption = "&Pause"
- End
- Begin Menu bar
- Caption = "-"
- End
- Begin Menu Exit
- Caption = "E&xit"
- End
- End
- Option Explicit
- Dim l_seqnum&, i_selitm%, s_tempmsg$
- Sub ChangeInterval (newint As Integer)
- Select Case newint
- Case 1:
- Interval_onesec.Checked = True
- Interval_twosec.Checked = False
- Interval_foursec.Checked = False
- Case 2:
- Interval_onesec.Checked = False
- Interval_twosec.Checked = True
- Interval_foursec.Checked = False
- Case 4:
- Interval_onesec.Checked = False
- Interval_twosec.Checked = False
- Interval_foursec.Checked = True
- End Select
- timTimer1.Interval = newint * 1000
- End Sub
- Sub Exit_Click ()
- End
- End Sub
- Function FindItemIx (idata As Long) As Integer
- Dim i%
- FindItemIx = -1
- For i = 0 To itgProcess.ListCount - 1
- If itgProcess.ItemData(i) = idata Then
- FindItemIx = i
- Exit Function
- End If
- Next i
- End Function
- Sub Form_Activate ()
- l_seqnum = 1
- i_selitm = -1
- Pause.Enabled = False
- End Sub
- Sub Interval_foursec_Click ()
- Call ChangeInterval(4)
- End Sub
- Sub Interval_onesec_Click ()
- Call ChangeInterval(1)
- End Sub
- Sub Interval_twosec_Click ()
- Call ChangeInterval(2)
- End Sub
- Sub itgProcess_DoItemClick (ItemIx As Integer, ItemHandle As Integer)
- Dim Msg$
- Select Case itgProcess.ItemData(ItemIx)
- Case 1:
- Msg = "The process starts when a customer places an order."
-
- Case 2:
- Msg = "When the order is received, shipping instructions are developed "
- Msg = Msg & "and sent to both the Accounting and Shipping departments."
- Case 3:
- Msg = "The Accounting Department develops an invoice, which is sent to the "
- Msg = Msg & "Shipping Department to be included with the shipment. "
- Msg = Msg & "<DOUBLECLICK FOR DETAILS>"
- Case 4:
- Msg = "Upon receipt of the shipping instructions, the Shipping Department "
- Msg = Msg & "retrieves the ordered goods from inventory and packs the "
- Msg = Msg & "order (goods and invoice) for shipment. "
- Case 5:
- Msg = "When goods are removed from inventory, a report is sent to Executive "
- Msg = Msg & "Management, indicating the current state of inventory."
- Case 6:
- Msg = "Executive Management receives notice of the order via the daily Order "
- Msg = Msg & "Report which is prepared by the Accounting Department, and is "
- Msg = Msg & "apprised of inventory reductions as goods are shipped. When the "
- Msg = Msg & "inventory levels fall below replacement thresholds, a Build Order "
- Msg = Msg & "is issued to the Manufacturing Department."
- Case 7:
- Msg = "Upon receipt of a Build Order, the Manufacturing Department manufactures "
- Msg = Msg & "goods to replenish inventory."
- Case Else:
- Msg = ""
- End Select
- itgProcess.ItemFillColor(ItemIx) = YELLOW
- lblMessage = Msg
- If i_selitm > -1 Then
- itgProcess.ItemFillColor(i_selitm) = WHITE
- End If
- i_selitm = ItemIx
- End Sub
- Sub itgProcess_ItemClick (ItemIx As Integer, ItemHandle As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
- Call itgProcess_DoItemClick(ItemIx, ItemHandle)
- End Sub
- Sub itgProcess_ItemDblClick (ItemIx As Integer, ItemHandle As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
- Dim i%
- If itgProcess.ItemData(ItemIx) = 3 Then
- itgProcess.Height = 20
- itgProcess.Width = 20
- itgProcess.Left = 80
- itgProcess.ItemFillColor(ItemIx) = RED
- itgSubProcess.Visible = True
- itgProcess.Enabled = False
- Run.Enabled = False
- s_tempmsg = lblMessage
- lblMessage = "<DOUBLECLICK ANYWHERE ON THE CHART TO RETURN TO THE MAIN PROCESS FLOW DIAGRAM>"
- End If
- For i = 0 To itgSubProcess.ListCount - 1
- itgSubProcess.ItemFillColor(i) = WHITE
- Next i
- End Sub
- Sub itgSubProcess_DblClick (Button As Integer, Shift As Integer, X As Integer, Y As Integer)
- Call itgSubProcess_DoDblClick
- End Sub
- Sub itgSubProcess_DoDblClick ()
- itgProcess.Height = 80
- itgProcess.Width = 100
- itgProcess.Left = 0
- itgProcess.ItemFillColor(i_selitm) = YELLOW
- itgSubProcess.Visible = False
- itgProcess.Enabled = True
- Run.Enabled = True
- lblMessage = s_tempmsg
- End Sub
- Sub itgSubProcess_ItemClick (ItemIx As Integer, ItemHandle As Integer, Button As Integer, Shift As Integer, X As Integer, Y As Integer)
- Dim i%, Msg$
- If itgSubProcess.ItemData(ItemIx) > 3 Then
- Exit Sub
- End If
- For i = 0 To itgSubProcess.ListCount - 1
- itgSubProcess.ItemFillColor(i) = WHITE
- Next i
- Select Case itgSubProcess.ItemData(ItemIx)
- Case 1:
- Msg = "Upon receipt of the Sales Order, the Account Management Clerk "
- Msg = Msg & "prepares the invoice for the order and forwards it to the "
- Msg = Msg & "Shipping Department. A copy of the invoice is also provided "
- Msg = Msg & "Accounts Receivables Clerk. All new sales are included in the "
- Msg = Msg & "daily status report provided to the Accounting Manager."
- Case 2:
- Msg = "The Accounts Receivable Clerk adds the new order to the accounts "
- Msg = Msg & "receivable database."
- Case 3:
- Msg = "The Accounting Manager receives a daily status report from the "
- Msg = Msg & "Account Management Clerk which summarizes all new sales activity."
- Case Else:
- Exit Sub
- End Select
- Msg = Msg & " <DOUBLECLICK ANYWHERE ON THE CHART TO RETURN TO THE MAIN PROCESS FLOW DIAGRAM>"
- itgSubProcess.ItemFillColor(ItemIx) = YELLOW
- lblMessage = Msg
- End Sub
- Sub Pause_Click ()
- If Pause.Caption = "&Pause" Then
- timTimer1.Enabled = False
- itgProcess.Enabled = True
- Pause.Caption = "&Continue"
- Else
- timTimer1.Enabled = True
- itgProcess.Enabled = False
- Pause.Caption = "&Pause"
- If itgSubProcess.Visible = True Then
- Call itgSubProcess_DoDblClick
- End If
- End If
- End Sub
- Sub Run_Click ()
- If Run.Caption = "&Run" Then
- Call itgProcess_DoItemClick(FindItemIx(1), 0)
- l_seqnum = 2
- timTimer1.Enabled = True
- itgProcess.Enabled = False
- Pause.Enabled = True
- Run.Caption = "&Stop"
- Else
- l_seqnum = -1
- itgProcess.ItemFillColor(i_selitm) = WHITE
- timTimer1.Enabled = False
- itgProcess.Enabled = True
- Pause.Enabled = False
- Pause.Caption = "&Pause"
- Run.Caption = "&Run"
- End If
- End Sub
- Sub timTimer1_Timer ()
- If l_seqnum < 8 Then
- Call itgProcess_DoItemClick(FindItemIx(l_seqnum), 0)
- l_seqnum = l_seqnum + 1
- Else
- l_seqnum = 0
- timTimer1.Enabled = False
- lblMessage = ""
- itgProcess.ItemFillColor(i_selitm) = WHITE
- itgProcess.Enabled = True
- Pause.Enabled = False
- Run.Caption = "&Run"
- End If
- End Sub
-